﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/SAFS.Master" CodeBehind="Blog.aspx.vb" Inherits="Template_SAFS_VB.Blog" %>

<%@ Register Assembly="DatePickerControl" Namespace="DatePickerControl" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="css/Blogs.css" rel="stylesheet" type="text/css" />
   <link href="css/modern.css" rel="stylesheet"/>
    <link href="css/modern-responsive.css" rel="stylesheet"/>
    <link href="css/site.css" rel="stylesheet" type="text/css"/>


      <!-- jQuery files -->
	<script type="text/javascript" src="jquery/jquery.js"></script>
	<script type="text/javascript" src="jquery/jRating.jquery.js"></script>
	<script type='text/javascript' src='js/jquery.simplemodal.js'></script>
	<script type='text/javascript' src='js/osx.js'></script>
	<link rel="stylesheet" type="text/css" href="css/demo.css" />
	<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
	<script type="text/javascript" src="js/script.js"></script>
    <script type="text/javascript" src="js/Blog.js"></script>
	<link href="css/modern.css" rel="stylesheet"/>
    <link href="css/modern-responsive.css" rel="stylesheet"/>
    <link href="css/site.css" rel="stylesheet" type="text/css"/>


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

   
 
    <div class="page-header-content">
    <div><h1><img src="images/back_button.png"  alt="" class="back_button" title="Atras" onclick="history.back()" />Blog</h1><br /><br /></div>
     </div> 

     <div class="UsuarioContent">
        <img src="images/user_default.jpg" class="fotoUsuario"/>
         
             <% 
                 
                 Dim blog As Dictionary(Of String, Object) = datosBlog()
                 
                 Response.Write("<div name='idDelusuario' class='infoUsuarioBlog' id='" & CType(blog("idUsuario"), String) & "'>")
                 
                 Response.Write(CType(blog("nombreUsuario"), String) & "<br>" & CType(blog("rol"), String) & "<br> Entradas Realizadas: " & CType(blog("cantEntradas"), String) & "<br>")
                 Response.Write("<font color='red'>" & validarBlog(blog) & "</font>")
                 Response.Write(" </div>")
                 %>
                
     </div>

     <div class="fechasEntradas">
           <table >
                <tr>
                    <td class="celdaFechas ">Fecha Inicio:</td>
                   <td class="celdaFechas " width="100"> 
                       <cc1:DatePicker ID="dtpInicio" runat="server" 
                           Width="80px" /></td>
                </tr>
                <tr>
                    <td class="celdaFechas " width="100">Fecha Fin:</td>
                   <td class="celdaFechas "><cc1:DatePicker ID="dtpFin" runat="server" Width="80px" /></td>
                </tr>
                <tr>
                    <td class="celdaFechas" width="100"><asp:Button ID="btnBuscarMiBlog" runat="server" 
                            Text="Buscar" /> 
                        <asp:Button ID="btnBuscarVisita"
                            runat="server" Text="Buscar" /></td>
                    <td class="celdaFechas" width="100">
                        <asp:Button ID="bntListarTodas" runat="server" Text="Listar Todas" />
                       </td>
                    
                   <%Response.Write(habilitarBotonEscrituraEntrada())%>
                </tr>
           </table>     
        </div>

        <div class="escribirEntrada" id="idEntrada" style="display:none" >
           <h3>T&iacute;tulo:</h3>
            <asp:TextBox ID="txtTitulo" runat="server" Width="500px" MaxLength="200" 
                ValidationGroup="crearEntrada"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ErrorMessage="*" Font-Bold="True" Font-Size="Medium" ForeColor="Red" 
                ValidationGroup="crearEntrada" ControlToValidate="txtTitulo"></asp:RequiredFieldValidator>
            <h3>Entrada:</h3>
            <asp:TextBox ID="txtEntrada" runat="server" Height="400px" Width="500px" 
                TextMode="MultiLine" MaxLength="3000" ValidationGroup="crearEntrada"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ErrorMessage="*" Font-Bold="True" Font-Size="Medium" ForeColor="Red" 
                ValidationGroup="crearEntrada" ControlToValidate="txtEntrada"></asp:RequiredFieldValidator>
            <br />
            <asp:Button ID="btnRegistrarEntrada" runat="server" Text="Guardar Entrada" 
                ValidationGroup="crearEntrada" />
        </div>
    
    <div class="contenerdor"> <!-- container -->
		<%Response.Write(listarEntradas())%>  
          
	</div>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>
